package com.weifangfirecontrolformal.weifangfirecontrolformal.web.web.internetofthings.firefightingvisualization;

import cn.hutool.json.JSONObject;
import com.weifangfirecontrolformal.weifangfirecontrolformal.common.base.BaseController;
import com.weifangfirecontrolformal.weifangfirecontrolformal.support.annotaion.Action;
import com.weifangfirecontrolformal.weifangfirecontrolformal.support.annotaion.At;
import com.weifangfirecontrolformal.weifangfirecontrolformal.support.model.RespEntity;
import com.weifangfirecontrolformal.weifangfirecontrolformal.web.service.internetofthings.firefightingvisualization.FirefightingvisualizationService;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import javax.annotation.Resource;

/**
 * 消防可视化检测控制器
 */
@Action
@RequestMapping(value="firefightingvisualization/firefightingvisualization")
public class FirefightingvisualizationController extends BaseController {
    @Resource
    public FirefightingvisualizationService firefightingvisualizationService;

    /**
     * 首页数据
     * @param
     * @return
     */
    @At(value = "getHomePageData", method = RequestMethod.GET, param = { "nums","type","userType"})
    public RespEntity getHomePageData(@RequestBody(required = false) JSONObject jsonParam) {
        return firefightingvisualizationService.getHomePageData(jsonParam);
    }

    /**
     * 可视视频首页数据
     * @param
     * @return
     */
    @At(value = "getVisualVideoHomePageData", method = RequestMethod.GET, param = { "nums","type","userType"})
    public RespEntity getVisualVideoHomePageData(@RequestBody(required = false) JSONObject jsonParam) {
        return firefightingvisualizationService.getVisualVideoHomePageData(jsonParam);
    }

    /**
     * 加油站首页数据
     * @param
     * @return
     */
    @At(value = "getGasStationHomePageData", method = RequestMethod.GET, param = { "nums","type","userType"})
    public RespEntity getGasStationHomePageData(@RequestBody(required = false) JSONObject jsonParam) {
        return firefightingvisualizationService.getGasStationHomePageData(jsonParam);
    }
    /**
     * 智慧梯控首页数据
     * @param
     * @return
     */
    @At(value = "getLadderControlHomePageData", method = RequestMethod.GET, param = { "nums","type","userType"})
    public RespEntity getLadderControlHomePageData(@RequestBody(required = false) JSONObject jsonParam) {
        return firefightingvisualizationService.getLadderControlHomePageData(jsonParam);
    }
    /**
     * 智慧水域首页数据
     * @param
     * @return
     */
    @At(value = "getWatersHomePageData", method = RequestMethod.GET, param = { "nums","type","userType"})
    public RespEntity getWatersHomePageData(@RequestBody(required = false) JSONObject jsonParam) {
        return firefightingvisualizationService.getWatersHomePageData(jsonParam);
    }

    /**
     * 实时报警列表
     * @param
     * alarmType	报警类型
     * @return
     */
    @At(value = "realTimeAlarm", method = RequestMethod.GET)
    public RespEntity realTimeAlarm(@RequestBody(required = false) JSONObject jsonParam) {
        return firefightingvisualizationService.realTimeAlarm(jsonParam);
    }
    /**
     * 加油站实时报警列表
     * @param
     * alarmType	报警类型
     * @return
     */
    @At(value = "gasStationRealTimeAlarm", method = RequestMethod.GET)
    public RespEntity gasStationRealTimeAlarm(@RequestBody(required = false) JSONObject jsonParam) {
        return firefightingvisualizationService.gasStationRealTimeAlarm(jsonParam);
    }
    /**
     * 加油站周数据、月数据
     * @return
     */
    @At(value = "gasStationWeekAlarm", method = RequestMethod.GET)
    public RespEntity gasStationWeekAlarm(@RequestBody(required = false) JSONObject jsonParam) {
        return firefightingvisualizationService.gasStationWeekAlarm(jsonParam);
    }

    /**
     * 智慧梯控实时报警列表
     * @param
     * alarmType	报警类型
     * @return
     */
    @At(value = "ladderControlRealTimeAlarm", method = RequestMethod.GET)
    public RespEntity ladderControlRealTimeAlarm(@RequestBody(required = false) JSONObject jsonParam) {
        return firefightingvisualizationService.ladderControlRealTimeAlarm(jsonParam);
    }
    /**
     * 智慧梯控周数据、月数据
     * @return
     */
    @At(value = "ladderControlWeekAlarm", method = RequestMethod.GET)
    public RespEntity ladderControlWeekAlarm(@RequestBody(required = false) JSONObject jsonParam) {
        return firefightingvisualizationService.ladderControlWeekAlarm(jsonParam);
    }

    /**
     * 智慧水域实时报警列表
     * @param
     * alarmType	报警类型
     * @return
     */
    @At(value = "watersRealTimeAlarm", method = RequestMethod.GET)
    public RespEntity watersRealTimeAlarm(@RequestBody(required = false) JSONObject jsonParam) {
        return firefightingvisualizationService.watersRealTimeAlarm(jsonParam);
    }
    /**
     * 智慧水域周数据、月数据
     */
    @At(value = "watersWeekAlarm", method = RequestMethod.GET)
    public RespEntity watersWeekAlarm(@RequestBody(required = false) JSONObject jsonParam) {
        return firefightingvisualizationService.watersWeekAlarm(jsonParam);
    }

    /**
     * 明厨亮灶实时报警列表
     * @param
     * alarmType	报警类型
     * @return
     */
    @At(value = "brightKitchenRealTimeAlarm", method = RequestMethod.GET)
    public RespEntity brightKitchenRealTimeAlarm(@RequestBody(required = false) JSONObject jsonParam) {
        return firefightingvisualizationService.brightKitchenRealTimeAlarm(jsonParam);
    }

    /**
     * 明厨亮灶周数据、月数据
     * @return
     */
    @At(value = "brightKitchenWeekAlarm", method = RequestMethod.GET)
    public RespEntity brightKitchenWeekAlarm(@RequestBody(required = false) JSONObject jsonParam) {
        return firefightingvisualizationService.brightKitchenWeekAlarm(jsonParam);
    }

    /**
     * 获取明厨亮灶统计数据
     * @param
     * @return
     */
    @At(value = "getBrightKitchenCount", method = RequestMethod.GET)
    public RespEntity brightKitchenCount(@RequestBody(required = false) JSONObject jsonParam) {
        return firefightingvisualizationService.brightKitchenCount(jsonParam);
    }

    /**
     * 一周报警
     * @param
     * businessId    单位id	否	这个参数有值时，1步骤就不用做了，直接用这个单位id进行查询即可
     * type	1 一周  2  本月	是	说明一下：以下是用type==1举例的；当type==2时，需要返回整个自然的月的数据
     * @return
     */
    @At(value = "weekAlarm", method = RequestMethod.GET)
    public RespEntity weekAlarm(@RequestBody(required = false) JSONObject jsonParam) {
        return firefightingvisualizationService.weekAlarm(jsonParam);
    }
   
}
